import React from 'react';
import ReactDOM, {render} from 'react-dom';

import {createStore} from 'redux';
import {Provider} from 'react-redux';

import Router from './router/index.jsx';
import App from './containers';

// import reducers from './reducers';
function reducer(state = {
  count: 0
}, action) {
  if (action.type === 'PLUS') {
    const newState = Object.assign({}, state, {
      count: state.count + 1
    })

    console.log('action: ', newState)
    return newState;
  }

  return state;
}

const store = createStore(reducer);

render((
  <Provider store={store}>
    <App/>
  </Provider>
), document.getElementById('app'));